using System;
using System.Collections.Generic;
using System.Text;

namespace Acms.DataControls
{
    [System.ComponentModel.Designer(typeof(PostControlDataSourceDesigner))]
    [System.Web.UI.ToolboxData("<{0}:PostControlDataSource runat=server/>")]
    public class PostControlDataSource : GenericDataSource<Bll.PostControl>
    {
        public enum Fields
        {
            Id,
            PostId, 
            TemplateControlId, 
            Value,
            ConcurencyId
        }

        protected override Acms.Bll.PostControl PopulateData(UpdateAction action, System.Collections.IDictionary keys, System.Collections.IDictionary values, System.Collections.IDictionary oldValues)
        {
            return base.PopulateData(action, keys, values, oldValues);
        }
    }

    public class PostControlDataSourceDesigner : GenericDataSourceDesigner<Bll.PostControl>
    {
        protected override Acms.Bll.PostControl GetDesignTimeItem(int index)
        {
            string[] names = new string[] { "Text", "Resource", "Html", "Posting" };
            Random rnd = new Random(index);
            Bll.PostControl tmp = Bll.PostControl.CreateInstance();
            return tmp;
        }
    }
}
